package util;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBUtil {
   static String driver = "com.mysql.jdbc.Driver";

   static String url = "jdbc:mysql://localhost:3306/shool";

   static String name = "root";

   static String pwd = "123456";

    public static Connection getConnection() {
        Connection conn = null;
        try{
            Class.forName(driver);
            conn = DriverManager.getConnection(url,name,pwd);
        } catch (Exception e){
            e.printStackTrace();
        }
        return conn;
    }
}